package com.anjun.springandjdbc.dao;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;

public class PersonMapper implements RowMapper<Person> {

	public Person mapRow(ResultSet res, int index) throws SQLException {
		Person person = new Person(res.getString("name"));
		person.setId(res.getInt("id"));
		return person;
	}
}
